namespace VAdvantage.Model
{

    /** Generated Model - DO NOT CHANGE */
    using System;
    using System.Text;
    using VAdvantage.DataBase;
    using VAdvantage.Common;
    using VAdvantage.Classes;
    using VAdvantage.Process;
    using VAdvantage.Model;
    using VAdvantage.Utility;
    using System.Data;
    /** Generated Model for WSP_DeletedUserLog
     *  @author Jagmohan Bhatt (generated) 
     *  @version Vienna Framework 1.1.1 - $Id$ */
    public class X_WSP_DeletedUserLog : PO
    {
        public X_WSP_DeletedUserLog(Context ctx, int WSP_DeletedUserLog_ID, String trxName)
            : base(ctx, WSP_DeletedUserLog_ID, trxName)
        {
            /** if (WSP_DeletedUserLog_ID == 0)
            {
            SetWSP_DeletedUserLog_ID (0);
            }
             */
        }
        public X_WSP_DeletedUserLog(Ctx ctx, int WSP_DeletedUserLog_ID, String trxName)
            : base(ctx, WSP_DeletedUserLog_ID, trxName)
        {
            /** if (WSP_DeletedUserLog_ID == 0)
            {
            SetWSP_DeletedUserLog_ID (0);
            }
             */
        }
        /** Load Constructor 
        @param ctx context
        @param rs result set 
        @param trxName transaction
        */
        public X_WSP_DeletedUserLog(Context ctx, DataRow rs, String trxName)
            : base(ctx, rs, trxName)
        {
        }
        /** Load Constructor 
        @param ctx context
        @param rs result set 
        @param trxName transaction
        */
        public X_WSP_DeletedUserLog(Ctx ctx, DataRow rs, String trxName)
            : base(ctx, rs, trxName)
        {
        }
        /** Load Constructor 
        @param ctx context
        @param rs result set 
        @param trxName transaction
        */
        public X_WSP_DeletedUserLog(Ctx ctx, IDataReader dr, String trxName)
            : base(ctx, dr, trxName)
        {
        }
        /** Static Constructor 
         Set Table ID By Table Name
         added by ->Harwinder */
        static X_WSP_DeletedUserLog()
        {
            Table_ID = Get_Table_ID(Table_Name);
            model = new KeyNamePair(Table_ID, Table_Name);
        }
        /** Serial Version No */
        static long serialVersionUID = 27633634106031L;
        /** Last Updated Timestamp 10/29/2012 4:36:29 PM */
        public static long updatedMS = 1351508789242L;
        /** AD_Table_ID=1000389 */
        public static int Table_ID;
        // =1000389;

        /** TableName=WSP_DeletedUserLog */
        public static String Table_Name = "WSP_DeletedUserLog";

        protected static KeyNamePair model;
        protected Decimal accessLevel = new Decimal(4);
        /** AccessLevel
        @return 4 - System 
        */
        protected override int Get_AccessLevel()
        {
            return Convert.ToInt32(accessLevel.ToString());
        }
        /** Load Meta Data
        @param ctx context
        @return PO Info
        */
        protected override POInfo InitPO(Context ctx)
        {
            POInfo poi = POInfo.GetPOInfo(ctx, Table_ID);
            return poi;
        }
        /** Load Meta Data
        @param ctx context
        @return PO Info
        */
        protected override POInfo InitPO(Ctx ctx)
        {
            POInfo poi = POInfo.GetPOInfo(ctx, Table_ID);
            return poi;
        }
        /** Info
        @return info
        */
        public override String ToString()
        {
            StringBuilder sb = new StringBuilder("X_WSP_DeletedUserLog[").Append(Get_ID()).Append("]");
            return sb.ToString();
        }
        /** Set User/Contact.
        @param AD_User_ID User within the system - Internal or Customer/Prospect Contact. */
        public void SetAD_User_ID(int AD_User_ID)
        {
            if (AD_User_ID <= 0) Set_Value("AD_User_ID", null);
            else
                Set_Value("AD_User_ID", AD_User_ID);
        }
        /** Get User/Contact.
        @return User within the system - Internal or Customer/Prospect Contact. */
        public int GetAD_User_ID()
        {
            Object ii = Get_Value("AD_User_ID");
            if (ii == null) return 0;
            return Convert.ToInt32(ii);
        }
        /** Set WSP_DeletedUserLog_ID.
        @param WSP_DeletedUserLog_ID WSP_DeletedUserLog_ID */
        public void SetWSP_DeletedUserLog_ID(int WSP_DeletedUserLog_ID)
        {
            if (WSP_DeletedUserLog_ID < 1) throw new ArgumentException("WSP_DeletedUserLog_ID is mandatory.");
            Set_ValueNoCheck("WSP_DeletedUserLog_ID", WSP_DeletedUserLog_ID);
        }
        /** Get WSP_DeletedUserLog_ID.
        @return WSP_DeletedUserLog_ID */
        public int GetWSP_DeletedUserLog_ID()
        {
            Object ii = Get_Value("WSP_DeletedUserLog_ID");
            if (ii == null) return 0;
            return Convert.ToInt32(ii);
        }
        /** Set WSP_GmailConfiguration_ID.
        @param WSP_GmailConfiguration_ID WSP_GmailConfiguration_ID */
        public void SetWSP_GmailConfiguration_ID(int WSP_GmailConfiguration_ID)
        {
            if (WSP_GmailConfiguration_ID <= 0) Set_Value("WSP_GmailConfiguration_ID", null);
            else
                Set_Value("WSP_GmailConfiguration_ID", WSP_GmailConfiguration_ID);
        }
        /** Get WSP_GmailConfiguration_ID.
        @return WSP_GmailConfiguration_ID */
        public int GetWSP_GmailConfiguration_ID()
        {
            Object ii = Get_Value("WSP_GmailConfiguration_ID");
            if (ii == null) return 0;
            return Convert.ToInt32(ii);
        }
        /** Set Gmail UID.
        @param WSP_Gmail_UID Gmail UID */
        public void SetWSP_Gmail_UID(String WSP_Gmail_UID)
        {
            if (WSP_Gmail_UID != null && WSP_Gmail_UID.Length > 100)
            {
                log.Warning("Length > 100 - truncated");
                WSP_Gmail_UID = WSP_Gmail_UID.Substring(0, 100);
            }
            Set_Value("WSP_Gmail_UID", WSP_Gmail_UID);
        }
        /** Get Gmail UID.
        @return Gmail UID */
        public String GetWSP_Gmail_UID()
        {
            return (String)Get_Value("WSP_Gmail_UID");
        }
        /** Set Deleted From Gmail.
        @param WSP_IsDeletedFromGmail Deleted From Gmail */
        public void SetWSP_IsDeletedFromGmail(Boolean WSP_IsDeletedFromGmail)
        {
            Set_Value("WSP_IsDeletedFromGmail", WSP_IsDeletedFromGmail);
        }
        /** Get Deleted From Gmail.
        @return Deleted From Gmail */
        public Boolean IsWSP_IsDeletedFromGmail()
        {
            Object oo = Get_Value("WSP_IsDeletedFromGmail");
            if (oo != null)
            {
                if (oo.GetType() == typeof(bool)) return Convert.ToBoolean(oo);
                return "Y".Equals(oo);
            }
            return false;
        }
    }

}
